#ifndef MANAGEROP_H
#define MANAGEROP_H

#include <QWidget>
#include <QTcpSocket>
#include <QNetworkProxy>
#include <QPalette>
#include "register.h"
#include "selectusr.h"

namespace Ui {
class ManagerOP;
}

class ManagerOP : public QWidget
{
    Q_OBJECT
private:
    QTcpSocket* socket;
    Register* myregister;
    SelectUsr* myusrs;
public:
    explicit ManagerOP(QWidget *parent = nullptr);
    ~ManagerOP();
public:
    void set_socket(QTcpSocket* socket);
private slots:
    void on_register_btn_clicked();
signals:
    void my_register_signal(bool if_ok);
    void my_delete_signal(bool if_ok);
    void my_add_signal();
    void my_select_staff_signal();
    void my_select_allusrs_signal(QStringList strlist);
    void my_clear_text_signal();

    void my_back_to_widget_signal();
private slots:
    void my_register_slot(bool if_ok);
    void my_delete_slot(bool if_ok);
    void on_add_btn_clicked();
    void on_selectstaff_btn_clicked();
    void on_query_btn_clicked();
    void on_selectusr_btn_clicked();
    void my_select_allusrs_slot(QStringList strlist);

    void my_clear_text_slot();
    void on_back_btn_clicked();

private:
    Ui::ManagerOP *ui;
};

#endif // MANAGEROP_H
